class Network
{
  // ...
  void draw() {
    
    for (int i = 0; i < input_layer.length; i++) {
      pushMatrix();
      translate(
        (i%14) * width / 25.0 + width * 0.22, 
        (i/14) * height / 25.0 + height * 0.42);
      input_layer[i].draw();
      popMatrix();
    }
    
    for (int j = 0; j < hidden_layer.length; j++) {
      pushMatrix();
      translate(
        (j%7) * width / 25.0 + width * 0.36, 
        (j/7) * height / 25.0 + height * 0.12);
      hidden_layer[j].draw();
      popMatrix();
    }
    
    for (int k = 0; k < output_layer.length; k++) {
      pushMatrix();
      translate(
        ((k+9)%10) * width / 20.0 + width * 0.25, 
        height * 0.05);
      output_layer[k].draw(true);
      popMatrix();
    }
  }
}